<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>解款信息</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		.table td {
			vertical-align: middle;
		}
		.footer {
			position:fixed; bottom:0; background:#ABABAB; width:100%; height:35px; line-height:32px; z-index:9999; opacity:1;
			filter:alpha(opacity=60); _bottom:auto; _width:100%; _position:absolute;text-align: right;
			_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-
			(parseInt(this.currentStyle.marginTop, 10)||0)-(parseInt(this.currentStyle.marginBottom, 10)||0)));
	    }
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			var nodeLen = $(".jbox-button-panel", top.document).length;
			$(".jbox-button-panel", top.document).eq(nodeLen-1).remove();
			if('${type}'!=''){
				parent.mainFrame.location.reload();
				top.$.jBox.close();
				document.location="${ctx}/ivm/order";
			}
			//加载处理level选择控制
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
		function submit(type){
			$("input[id='type']").val(type);
			$("#inputForm").submit();
		}
	</script>
</head>
<body>
<form:form id="inputForm" modelAttribute="order" action="${ctx}/ivm/order/finishPayOrder" method="post" class="form-horizontal">
	<tags:message content="${message}"/>
	<input type="hidden" name="id" id="id" value="${order.id }"/>
	<input type="hidden" name="type" id="type" value="0"/>
	<div style="margin:10px;margin-bottom: 50px;">
		<div class="control-group">
			<label class="control-label">订单编号：</label>
			<div class="controls">
				${order.orderNo }
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单金额：</label>
			<div class="controls">
				${order.deliveryAmount } 元
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">${order.payType=='1'?'应收':'应退' }金额：</label>
			<div class="controls">
				<c:if test="${order.payType=='1'}">${order.deliveryAmount}</c:if>
				<c:if test="${order.payType!='1'}">${order.refund}</c:if>
				 元
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">签收时间：</label>
			<div class="controls">
				<fmt:formatDate value="${deliveryInfo.signTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">${order.payType=='1'?'实收':'实退' }金额：</label>
			<div class="controls">
				<c:if test="${order.payType=='1'}">${deliveryInfo.realAmount}</c:if>
				<c:if test="${order.payType!='1'}">${order.realRefund}</c:if>
				 元
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">送货备注：</label>
			<div class="controls">
				${deliveryInfo.receiptMarks}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><span class="color-red font-size20">*</span>解款密码：</label>
			<div class="controls">
				<input type="text" id="payCode" name="payCode" htmlEscape="false" maxlength="200" class="required"/>
			</div>
		</div>
	</div>
</form:form>
<!--endprint-->
<div class="footer" id="printDiv">
	<input value="退回复核" type="button" class="btn btn-primary" style="margin-right: 20px;" onclick="submit(2)"/>
	<input value="同意解款" type="button" class="btn btn-primary" style="margin-right: 20px;" onclick="submit(1)"/>
</div>
</body>
</html>